<?php
	namespace Home\Controller\Auto;
	use Home\Controller\Layout\LayoutController;
	class AutoController extends LayoutController {
		public function _initialize(){
			if(empty(session('home_id'))){
				echo '<script>alert("请先登录");window.location.href="'.U('/home/login/login/login').'"</script>';
				return ;
			}
			$this->vo=\Home\Controller\IndexController::data();
			$this->vos=\Home\Controller\Blog\ArticleController::datas();
			$this->link=M('link')->select();
			if(session('home_id')){
				$where['uid']=session('home_id');
	            $where['status']=0;
	            $this->totals=M('g_cart')->where($where)->count();
			}
		}
	}
?>